package com.gitee.zycra.file.param;

/**
 * The param class for upload.
 *
 * @author zycra
 * @since 1.0.0
 */
public final class UploadParam {

    /**
     * Server path where the file is located.
     *
     * @since 1.0.0
     */
    private String serverPath;

    /**
     * The file name on the server after the file is uploaded.
     *
     * @since 1.0.0
     */
    private String serverFileName;

    /**
     * The absolute path of local file.
     *
     * @since 1.0.0
     */
    private String localFilePathAndName;

    /**
     * Whether to encrypt the file before uploading.
     *
     * @since 1.0.0
     */
    private boolean encrypt;

    /**
     * The key to encrypt the file.
     * <p>Key type is SM2 public key from outer.
     *
     * @since 1.0.0
     */
    private String encryptKey;

    /**
     * The key to sign the file.
     * <p>Key type is SM2 private key from inner.
     *
     * @since 1.0.0
     */
    private String signKey;

    /**
     * Whether to delete origin file.
     *
     * @since 1.0.0
     */
    private boolean deleteOriginFile;

    /**
     * The speed limit for transfer(kb/s).
     * <p>0 or negative means no limit.
     *
     * @since 1.0.0
     */
    private long speedLimit;

    public String getServerPath() {
        return serverPath;
    }

    public UploadParam setServerPath(String serverPath) {
        this.serverPath = serverPath;
        return this;
    }

    public String getServerFileName() {
        return serverFileName;
    }

    public UploadParam setServerFileName(String serverFileName) {
        this.serverFileName = serverFileName;
        return this;
    }

    public String getLocalFilePathAndName() {
        return localFilePathAndName;
    }

    public UploadParam setLocalFilePathAndName(String localFilePathAndName) {
        this.localFilePathAndName = localFilePathAndName;
        return this;
    }

    public boolean isEncrypt() {
        return encrypt;
    }

    public UploadParam setEncrypt(boolean encrypt) {
        this.encrypt = encrypt;
        return this;
    }

    public String getEncryptKey() {
        return encryptKey;
    }

    public UploadParam setEncryptKey(String encryptKey) {
        this.encryptKey = encryptKey;
        return this;
    }

    public String getSignKey() {
        return signKey;
    }

    public UploadParam setSignKey(String signKey) {
        this.signKey = signKey;
        return this;
    }

    public boolean isDeleteOriginFile() {
        return deleteOriginFile;
    }

    public UploadParam setDeleteOriginFile(boolean deleteOriginFile) {
        this.deleteOriginFile = deleteOriginFile;
        return this;
    }

    public long getSpeedLimit() {
        return speedLimit;
    }

    public UploadParam setSpeedLimit(long speedLimit) {
        this.speedLimit = speedLimit;
        return this;
    }
}
